package service.imp;

import bean.UserBean;
import dao.IUserDao;
import dao.UserDaoImp;
import service.IUserService;

import java.util.List;

public class UserServiceImp implements IUserService {
    private IUserDao dao = new UserDaoImp();

    @Override
    public List<UserBean> findAll() {
        return dao.findAll();
    }

    @Override
    public UserBean login(String name, String pwd) {
        return dao.findByGrad(name, pwd);
    }

    @Override
    public void add(UserBean user) {
        dao.add(user);
    }
}
